package com.fr.data.core.db.dialect;

public class InformixDialect extends AbstractDialect
{
  public String columnType2SQL(int paramInt, String paramString)
  {
    if (paramInt == -7)
      return "varchar(1)";
    return super.columnType2SQL(paramInt, paramString);
  }

  public String getIdentitySelectString(String paramString1, String paramString2, int paramInt)
    throws Exception
  {
    return ((paramInt == -5) ? "select dbinfo('serial8') from systables where tabid=1" : "select dbinfo('sqlca.sqlerrd1') from systables where tabid=1");
  }

  public boolean supportsLimit()
  {
    return true;
  }

  public boolean supportsLimitOffset()
  {
    return false;
  }

  public String getLimitString(String paramString, int paramInt1, int paramInt2)
  {
    if (paramInt1 > 0)
      throw new UnsupportedOperationException("query result offset is not supported");
    return new StringBuffer(paramString.length() + 16).append(paramString).insert(paramString.toLowerCase().indexOf("select") + 6, " first " + paramInt2).toString();
  }
}